#include <basic_types.h>
#include <mediatypes.h>
#include <osal/osal.h>
#include <api/libc/printf.h>
#include <hld/osd/osddrv.h>
#include <api/libttx/ttx_osd.h>
#include <api/libttx/lib_ttx.h>
#include <hld/hld_dev.h>
#include <hld/dis/vpo.h>

#define LATIN_CHAR			0
#define MOSAIC_CHAR		    1

extern struct ttx_config_par g_ttx_pconfig_par;

volatile BOOL ttx_show_on;
struct osd_device *osd_dev;
UINT8 m_bCurRegion;
VSCR TTX_Vscr ;

UINT8 TTX_VscrBuf_8M[ ( ((TTX_CHAR_W*2)>>TTX_FACTOR) ) * TTX_CHAR_H*2];

extern UINT32 osd_ttx_width;
extern UINT32 osd_ttx_height;
extern UINT32 osd_ttx_startcol;
extern UINT32 osd_ttx_startrow;
//extern UINT32 osd_ttx_xoffset;
//extern UINT32 osd_ttx_yoffset;
extern void ttx_delete_whole();

static const UINT32 TTX_Font[][96][9] = 
{
	//Latin G0 set, 0x20~0x7f maps to 0x20~0x7f
		{
		     { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  032  0x20
                   { 0x00000000, 0x0001c007, 0x001c0070, 0x01c00700, 0x1c007001, 0xc0070000, 0x007001c0, 0x07000000, 0x00000000},    //  033  0x21
                   { 0x00000000, 0x001f7c7d, 0xf1f7c3cf, 0x0f3c79c1, 0xe7000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  034  0x22
                   { 0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},    //  035  0x23
                   { 0x00000000, 0x0000c003, 0x007f03ff, 0x0ffc3cf0, 0xf001f003, 0xf001f003, 0xc3cf07f0, 0x0f800c00, 0x3000c000},    //  036  0x24
                   { 0x00000000, 0x00000038, 0x19f0e6c7, 0x9b1c7ce0, 0xe7003803, 0xc01ee0f7, 0xc71b187c, 0x40e00000, 0x00000000},    //  037  0x25
                   { 0x00000000, 0x0000003f, 0x01fe0618, 0x18606181, 0x8603f00f, 0xc0739b87, 0xec0e3ffe, 0x7f980000, 0x00000000},    //  038  0x26
                   { 0x00000000, 0x0003e00f, 0x803e0078, 0x01e00f00, 0x3c000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  039  0x27
                   { 0x00000000, 0x00000001, 0xc01f00f0, 0x03c01f00, 0x7801e007, 0x801e007c, 0x00f001f0, 0x01c00000, 0x00000000},    //  040  0x28
                   { 0x00000000, 0x0000001c, 0x007c0078, 0x01e007c0, 0x0f003c00, 0xf003c01f, 0x007807c0, 0x1c000000, 0x00000000},    //  041  0x29
                   { 0x00000000, 0x0001e007, 0x83deef7b, 0xbdeef7bb, 0xffe0fc3f, 0xfef7bbde, 0xef7b81e0, 0x07800000, 0x00000000},    //  042  0x2a
                   { 0x00000000, 0x00000000, 0x001e0078, 0x01e00781, 0xffc7ff1f, 0xfc07801e, 0x00780000, 0x00000000, 0x00000000},    //  043  0x2b
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000f0, 0x03c00f00, 0x1c00e003, 0x800e0000},    //  044  0x2c
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xffc7ff1f, 0xfc000000, 0x00000000, 0x00000000, 0x00000000},    //  045  0x2d
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000f0, 0x03c00f00, 0x3c000000, 0x00000000},    //  046  0x2e
                   { 0x00000000, 0x00000000, 0x3001c00f, 0x007803c0, 0x1e00f007, 0x803c01e0, 0x0f003800, 0x00000000, 0x00000000},    //  047  0x2f
                   { 0x00000000, 0x00000007, 0x807f83cf, 0x0f3c3cf0, 0xf3c3cf0f, 0x3c3cf0f3, 0xc3cf07f8, 0x07800000, 0x00000000},    //  048  0x30
                   { 0x00000000, 0x00000003, 0xc01f00fc, 0x07f01fc0, 0x0f003c00, 0xf003c00f, 0x003c00f0, 0x03c00000, 0x00000000},    //  049  0x31
                   { 0x00000000, 0x0000000f, 0xc07f83ff, 0x0e3c38f0, 0x07803c01, 0xe00f0078, 0x03ff0ffc, 0x3ff00000, 0x00000000},    //  050  0x32
                   { 0x00000000, 0x00000007, 0x807f03ce, 0x0e1c3870, 0x03c03c00, 0xf000f0e1, 0xc3ce07f0, 0x07800000, 0x00000000},    //  051  0x33
                   { 0x00000000, 0x00000001, 0xc00f007c, 0x03f01fc0, 0xf7071c1c, 0x707ff1ff, 0xc01c0070, 0x01c00000, 0x00000000},    //  052  0x34
                   { 0x00000000, 0x0000007f, 0xe1ff8700, 0x1c007001, 0xff07fe00, 0x7800e1c3, 0x87de0ff0, 0x1f800000, 0x00000000},    //  053  0x35
                   { 0x00000000, 0x0000000f, 0xc07f8186, 0x0e003800, 0xfe03fc0e, 0x3838e0e3, 0x818e07f0, 0x0f800000, 0x00000000},    //  054  0x36
                   { 0x00000000, 0x0000003f, 0xe0ff8006, 0x003800e0, 0x07001800, 0xe0070018, 0x00e00300, 0x0c000000, 0x00000000},    //  055  0x37
                   { 0x00000000, 0x0000000f, 0x807f038e, 0x0e3838e0, 0xe381fc07, 0xf038e0e3, 0x838e07f0, 0x0f800000, 0x00000000},    //  056  0x38
                   { 0x00000000, 0x0000000f, 0x807f038e, 0x0e3838e0, 0xe3838e07, 0xf80fe003, 0x830e0ff0, 0x1f800000, 0x00000000},    //  057  0x39
                   { 0x00000000, 0x00000000, 0x003c00f0, 0x03c00f00, 0x3c000000, 0x000f003c, 0x00f003c0, 0x00000000, 0x00000000},    //  058  0x3a
                   { 0x00000000, 0x00000000, 0x003c00f0, 0x03c00f00, 0x3c000000, 0x000f003c, 0x00f003c0, 0x1f007800, 0x00000000},    //  059  0x3b
                   { 0x00000000, 0x00001c01, 0xf01fc0fc, 0x07e01f83, 0xf80f803f, 0x801f803f, 0x007f007c, 0x00700000, 0x00000000},    //  060  0x3c
                   { 0x00000000, 0x00000000, 0x01ffc7ff, 0x1ffc7ff0, 0x0007ff1f, 0xfc7ff000, 0x00000000, 0x00000000, 0x00000000},    //  061  0x3d
                   { 0x00000000, 0x003c00f8, 0x03f801f8, 0x03f00fc0, 0x1fc01f01, 0xfc0fc07e, 0x0fe03e00, 0xf0000000, 0x00000000},    //  062  0x3e
                   { 0x00000000, 0x000ff83f, 0xf1ffc78f, 0x003c00f0, 0x03c07f01, 0xf8070000, 0x007001c0, 0x07000000, 0x00000000},    //  063  0x3f
                   { 0x00000000, 0x0003fc3f, 0xf1e1efbf, 0xbcfef3fb, 0xddef77bd, 0xdef3fbef, 0xe7801ffc, 0x3ff00000, 0x00000000},    //  064  0x40
                   { 0x00000000, 0x00000007, 0x001c01f8, 0x07e01f80, 0xf783de1e, 0x3c78f3ff, 0xefffb81e, 0xc0180000, 0x00000000},    //  065  0x41
                   { 0x00000000, 0x0000003f, 0x80ff03ce, 0x0f383ce0, 0xf383fc0f, 0xf83c70f1, 0xc3c70ff8, 0x3fc00000, 0x00000000},    //  066  0x42
                   { 0x00000000, 0x0000001f, 0x80ff03ce, 0x1e1c7871, 0xe007801e, 0x007801e1, 0xc3ce0ff0, 0x1f800000, 0x00000000},    //  067  0x43
                   { 0x00000000, 0x0000007f, 0x81ff071c, 0x1c3c70f1, 0xc3c70f1c, 0x3c70f1c3, 0xc71c1ff0, 0x7f800000, 0x00000000},    //  068  0x44
                   { 0x00000000, 0x0000007f, 0xe1ff8700, 0x1c007001, 0xc007fc1f, 0xf07001c0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  069  0x45
                   { 0x00000000, 0x0000003f, 0xe0ff83c0, 0x0f003c00, 0xf003fc0f, 0xf03c00f0, 0x03c00f00, 0x3c000000, 0x00000000},    //  070  0x46
                   { 0x00000000, 0x0000000f, 0xc0ff838f, 0x9c1e7079, 0xc007001c, 0x7e71f9c1, 0xe38f8ffe, 0x0fc00000, 0x00000000},    //  071  0x47
                   { 0x00000000, 0x00000070, 0x71c1c707, 0x1c1c7071, 0xc1c7ff1f, 0xfc7071c1, 0xc7071c1c, 0x70700000, 0x00000000},    //  072  0x48
                   { 0x00000000, 0x0000000f, 0x003c00f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  073  0x49
                   { 0x00000000, 0x00000000, 0xe003800e, 0x003800e0, 0x03800e00, 0x3870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},    //  074  0x4a
                   { 0x00000000, 0x00000078, 0x39e1c78e, 0x1e707b81, 0xfc07e01f, 0xc07f81e7, 0x078e1e1c, 0x78380000, 0x00000000},    //  075  0x4b
                   { 0x00000000, 0x0000001c, 0x007001c0, 0x07001c00, 0x7001c007, 0x001c0070, 0x01c007fc, 0x1ff00000, 0x00000000},    //  076  0x4c
                   { 0x00000000, 0x0000007c, 0x7df1f7ef, 0xdfbf7efd, 0xfbf7ffde, 0xe77b9dee, 0x7791de47, 0x791c0000, 0x00000000},    //  077  0x4d
                   { 0x00000000, 0x00000070, 0x39e0e7c3, 0x9f8e7e39, 0xfce7ff9e, 0xfe79f9e3, 0xe7839e0e, 0x78380000, 0x00000000},    //  078  0x4e
                   { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7879e1, 0xe3cf0ffc, 0x07800000, 0x00000000},    //  079  0x4f
                   { 0x00000000, 0x0000007f, 0xe1ffc78f, 0x1e3c78f1, 0xe3c7ff1f, 0xf87801e0, 0x07801e00, 0x78000000, 0x00000000},    //  080  0x50
                   { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7b79ed, 0xe3df0ffc, 0x07f80060, 0x00000000},    //  081  0x51
                   { 0x00000000, 0x0000007f, 0xc1ffc78f, 0x1e3c78f1, 0xe3c7fc1f, 0xe07bc1e7, 0xc78f9e1e, 0x78380000, 0x00000000},    //  082  0x52
                   { 0x00000000, 0x0000001f, 0x80ff078f, 0x1e1c7801, 0xfe03fe07, 0xfc00f1c3, 0xc79f0ff8, 0x1fc00000, 0x00000000},    //  083  0x53
                   { 0x00000000, 0x000000ff, 0xfbffe0f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  084  0x54
                   { 0x00000000, 0x00000070, 0x79c1e707, 0x9c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe7cf8ff8, 0x1fc00000, 0x00000000},    //  085  0x55
                   { 0x00000000, 0x000000e0, 0x7b81e70e, 0x1c383dc0, 0xf703dc07, 0xe01f803c, 0x00f00080, 0x02000000, 0x00000000},    //  086  0x56
                   { 0x00000000, 0x000000e7, 0x3b9cee73, 0xb9cee73b, 0x9cee73bb, 0xeefdfbe3, 0xef0fbc1e, 0x60300000, 0x00000000},    //  087  0x57
                   { 0x00000000, 0x000000e0, 0x7bc3e79e, 0x0ff01f80, 0x7e00f003, 0xc01f80ff, 0x079e3c3c, 0xe0700000, 0x00000000},    //  088  0x58
                   { 0x00000000, 0x000000e0, 0x73c3c79e, 0x0ff01f80, 0x7e00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  089  0x59
                   { 0x00000000, 0x0000007f, 0xe1ff800e, 0x007803c0, 0x1e00f007, 0x803c01e0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  090  0x5a
                   { 0x00000000, 0x7e01f807, 0x801e0078, 0x01e00780, 0x1e007801, 0xe007801e, 0x007801f8, 0x07e00000, 0x00000000},    //  091  0x5b
                   { 0x00000000, 0x001c0078, 0x01f001e0, 0x03c00f00, 0x1f003e00, 0x7c00f800, 0xe0018000, 0x00000000, 0x00000000},    //  092  0x5c
                   { 0x00000001, 0xf007c007, 0x001c0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007007c0, 0x1f000000, 0x00000000},    //  093  0x5d
                   { 0x0f807f07, 0x9e1c1800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  094  0x5e
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7ff9ffe7, 0xff9ffe00},    //  095  0x5f
                   { 0x00000600, 0x1e007c00, 0xf001c000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  096  0x60
                   { 0x00000000, 0x00000000, 0x00000000, 0x07de3ff9, 0xf3e7cf9e, 0x1e7879e1, 0xe7cf8ffe, 0x1f780000, 0x00000000},    //  097  0x61
                   { 0x00000000, 0x00000078, 0x01e00780, 0x1fe07fc1, 0xf3c7cf1e, 0x3c78f1e3, 0xc7cf1ff0, 0x7f800000, 0x00000000},    //  098  0x62
                   { 0x00000000, 0x00000000, 0x00000000, 0x01f01ff0, 0xffc3c70e, 0x003800f1, 0xc3ff07fc, 0x07c00000, 0x00000000},    //  099  0x63
                   { 0x00000000, 0x00000000, 0x7001c007, 0x03dc1ff0, 0xffc3870e, 0x1c3870e1, 0xc3ff07fc, 0x0f700000, 0x00000000},    //  100  0x64
                   { 0x00000000, 0x00000000, 0x00000000, 0x03f01fe0, 0xf3c3870f, 0xfc3ff0e0, 0x03c707fc, 0x0fe00000, 0x00000000},    //  101  0x65
                   { 0x00000000, 0x00000003, 0xc03f00f0, 0x03c01fc0, 0x7f01fc03, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  102  0x66
                   { 0x00000000, 0x00000000, 0x00000000, 0x03ee3ff8, 0xe3e38f9c, 0x1e7078e3, 0xe3ff87fe, 0x0078e1e3, 0xff07f800},    //  103  0x67
                   { 0x00000000, 0x00000070, 0x01c00700, 0x1c007fc1, 0xff87fe1c, 0x3870e1c3, 0x870e1c38, 0x70e00000, 0x00000000},    //  104  0x68
                   { 0x00000000, 0x0000000f, 0x003c0000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  105  0x69
                   { 0x00000000, 0x0000000f, 0x003c0000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f003c03, 0xf00f8000},    //  106  0x6a
                   { 0x00000000, 0x000000f0, 0x03c00f00, 0x3cf0f783, 0xfc0fe03f, 0x00fc03fc, 0x0f783cf0, 0xf0e00000, 0x00000000},    //  107  0x6b
                   { 0x00000000, 0x0000000e, 0x003800e0, 0x03800e00, 0x3800e003, 0x800e0038, 0x00e00380, 0x0e000000, 0x00000000},    //  108  0x6c
                   { 0x00000000, 0x00000000, 0x00000000, 0x3ff8fff3, 0xccef33bc, 0xcef33bcc, 0xef33bcce, 0xf3380000, 0x00000000},    //  109  0x6d
                   { 0x00000000, 0x00000000, 0x00000000, 0x1ff07ff1, 0xe3c78f1e, 0x3c78f1e3, 0xc78f1e3c, 0x78f00000, 0x00000000},    //  110  0x6e
                   { 0x00000000, 0x00000000, 0x00000000, 0x03e03fe1, 0xf7c78f1e, 0x3c78f1e3, 0xc7df0ff8, 0x0f800000, 0x00000000},    //  111  0x6f
                   { 0x00000000, 0x00000000, 0x00000000, 0x1de07fe1, 0xf3c7cf1e, 0x3c78f1e3, 0xc7cf1ff8, 0x7f81e007, 0x801e0000},    //  112  0x70
                   { 0x00000000, 0x00000000, 0x00000000, 0x07dc3ff1, 0xe7c79f1e, 0x3c78f1e3, 0xc79f0ffc, 0x1ff003c0, 0x0f003c00},    //  113  0x71
                   { 0x00000000, 0x00000000, 0x00000000, 0x07b81fe0, 0x7f01f007, 0x801e0078, 0x01e00780, 0x1e000000, 0x00000000},    //  114  0x72
                   { 0x00000000, 0x00000000, 0x00000000, 0x07f83ff0, 0xe1c3800f, 0xf81ff001, 0xc3870ffc, 0x1fe00000, 0x00000000},    //  115  0x73
                   { 0x00000000, 0x00000003, 0x003c00f0, 0x07f01fc0, 0x3c00f003, 0xc00f003c, 0x00f003f0, 0x03c00000, 0x00000000},    //  116  0x74
                   { 0x00000000, 0x00000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x870e1ff8, 0x3fc00000, 0x00000000},    //  117  0x75
                   { 0x00000000, 0x00000000, 0x00000000, 0x1e3c78f0, 0xf783de07, 0x701fc03e, 0x00f801c0, 0x02000000, 0x00000000},    //  118  0x76
                   { 0x00000000, 0x00000000, 0x00000000, 0x3bdeef7b, 0xbdeef7bb, 0xdeef7bbd, 0xeef7bffe, 0x79e00000, 0x00000000},    //  119  0x77
                   { 0x00000000, 0x00000000, 0x00000000, 0x1c1c78f0, 0xff83fe07, 0xf00f807f, 0x03fe1e3c, 0x70700000, 0x00000000},    //  120  0x78
                   { 0x00000000, 0x00000000, 0x00000000, 0x1c3870e0, 0xef03bc0e, 0xf01fc07e, 0x00f803e0, 0x07003c03, 0xc00e0000},    //  121  0x79
                   { 0x00000000, 0x00000000, 0x00000000, 0x0ff03fc0, 0x0f003c01, 0xe00f0070, 0x03800ff0, 0x3fc00000, 0x00000000},    //  122  0x7a
                   { 0x00001f00, 0xfc03c00f, 0x003c00f0, 0x07c03c00, 0xf003c007, 0xc00f003c, 0x00f003c0, 0x0fc01f00, 0x00000000},    //  123  0x7b
                   { 0x00000000, 0x7801e007, 0x801e0000, 0x00000000, 0x00000000, 0x0007801e, 0x007801e0, 0x00000000, 0x00000000},    //  124  0x7c
                   { 0x0000f003, 0xe003800e, 0x003800e0, 0x03e007c0, 0x1f007c03, 0xe00e0038, 0x00e00380, 0x3e00f000, 0x00000000},    //  125  0x7d
                   { 0x1c31f9cf, 0x7e38f000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  126  0x7e
                   { 0x0001ffe7, 0xff9ffe7f, 0xf9ffe7ff, 0x9ffe7ff9, 0xffe7ff9f, 0xfe7ff9ff, 0xe7ff8000, 0x00000000, 0x00000000}    //  127  0x7f
		},
	//G1 block mosaics set, 0x20~0x3f maps to 0x00~0x1f,0x60~0x7f maps to 0x80~0x9f
		{
			{ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  000  0x00
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  001  0x01
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  002  0x02
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  003  0x03
                   { 0x00000000, 0x00000000, 0x00000fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03f8, 0x00000000, 0x00000000, 0x00000000},    //  004  0x04
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03f8, 0x00000000, 0x00000000, 0x00000000},    //  005  0x05
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xff80fe03, 0xf80fe03f, 0x80fe03f8, 0x00000000, 0x00000000, 0x00000000},    //  006  0x06
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xff80fe03, 0xf80fe03f, 0x80fe03f8, 0x00000000, 0x00000000, 0x00000000},    //  007  0x07
                   { 0x00000000, 0x00000000, 0x0000001f, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf0000000, 0x00000000, 0x00000000},    //  008  0x08
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf0000000, 0x00000000, 0x00000000},    //  009  0x09
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf0000000, 0x00000000, 0x00000000},    //  010  0x0a
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf0000000, 0x00000000, 0x00000000},    //  011  0x0b
                   { 0x00000000, 0x00000000, 0x00000fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000, 0x00000000, 0x00000000},    //  012  0x0c
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000, 0x00000000, 0x00000000},    //  013  0x0d
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000, 0x00000000, 0x00000000},    //  014  0x0e
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000, 0x00000000, 0x00000000},    //  015  0x0f
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  016  0x10
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x00000000, 0x00000000, 0x000003f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  017  0x11
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc0000000, 0x00000000, 0x000003f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  018  0x12
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc0000000, 0x00000000, 0x000003f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  019  0x13
                   { 0x00000000, 0x00000000, 0x03f80fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  020  0x14
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  021  0x15
                   { 0x01fc07f0, 0x1fc07f01, 0xffffffff, 0xff80fe03, 0xf80fe03f, 0x80fe03f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  022  0x16
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xff80fe03, 0xf80fe03f, 0x80fe03f8, 0x0fe03f80, 0xfe03f80f, 0xe03f8000},    //  023  0x17
                   { 0x00000000, 0x00000000, 0x0000001f, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  024  0x18
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  025  0x19
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  026  0x1a
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  027  0x1b
                   { 0x00000000, 0x00000000, 0x00000fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  028  0x1c
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  029  0x1d
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  030  0x1e
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe03f80, 0xfe03f80f, 0xe03f8000},    //  031  0x1f
                     
                   //lack 32 characters   // get from G0 Set , Steve Lee 2004.12.19                   
		     { 0x00000000, 0x0003fc3f, 0xf1e1efbf, 0xbcfef3fb, 0xddef77bd, 0xdef3fbef, 0xe7801ffc, 0x3ff00000, 0x00000000},    //  064  0x40
                   { 0x00000000, 0x00000007, 0x001c01f8, 0x07e01f80, 0xf783de1e, 0x3c78f3ff, 0xefffb81e, 0xc0180000, 0x00000000},    //  065  0x41
                   { 0x00000000, 0x0000003f, 0x80ff03ce, 0x0f383ce0, 0xf383fc0f, 0xf83c70f1, 0xc3c70ff8, 0x3fc00000, 0x00000000},    //  066  0x42
                   { 0x00000000, 0x0000001f, 0x80ff03ce, 0x1e1c7871, 0xe007801e, 0x007801e1, 0xc3ce0ff0, 0x1f800000, 0x00000000},    //  067  0x43
                   { 0x00000000, 0x0000007f, 0x81ff071c, 0x1c3c70f1, 0xc3c70f1c, 0x3c70f1c3, 0xc71c1ff0, 0x7f800000, 0x00000000},    //  068  0x44
                   { 0x00000000, 0x0000007f, 0xe1ff8700, 0x1c007001, 0xc007fc1f, 0xf07001c0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  069  0x45
                   { 0x00000000, 0x0000003f, 0xe0ff83c0, 0x0f003c00, 0xf003fc0f, 0xf03c00f0, 0x03c00f00, 0x3c000000, 0x00000000},    //  070  0x46
                   { 0x00000000, 0x0000000f, 0xc0ff838f, 0x9c1e7079, 0xc007001c, 0x7e71f9c1, 0xe38f8ffe, 0x0fc00000, 0x00000000},    //  071  0x47
                   { 0x00000000, 0x00000070, 0x71c1c707, 0x1c1c7071, 0xc1c7ff1f, 0xfc7071c1, 0xc7071c1c, 0x70700000, 0x00000000},    //  072  0x48
                   { 0x00000000, 0x0000000f, 0x003c00f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  073  0x49
                   { 0x00000000, 0x00000000, 0xe003800e, 0x003800e0, 0x03800e00, 0x3870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},    //  074  0x4a
                   { 0x00000000, 0x00000078, 0x39e1c78e, 0x1e707b81, 0xfc07e01f, 0xc07f81e7, 0x078e1e1c, 0x78380000, 0x00000000},    //  075  0x4b
                   { 0x00000000, 0x0000001c, 0x007001c0, 0x07001c00, 0x7001c007, 0x001c0070, 0x01c007fc, 0x1ff00000, 0x00000000},    //  076  0x4c
                   { 0x00000000, 0x0000007c, 0x7df1f7ef, 0xdfbf7efd, 0xfbf7ffde, 0xe77b9dee, 0x7791de47, 0x791c0000, 0x00000000},    //  077  0x4d
                   { 0x00000000, 0x00000070, 0x39e0e7c3, 0x9f8e7e39, 0xfce7ff9e, 0xfe79f9e3, 0xe7839e0e, 0x78380000, 0x00000000},    //  078  0x4e
                   { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7879e1, 0xe3cf0ffc, 0x07800000, 0x00000000},    //  079  0x4f
                   { 0x00000000, 0x0000007f, 0xe1ffc78f, 0x1e3c78f1, 0xe3c7ff1f, 0xf87801e0, 0x07801e00, 0x78000000, 0x00000000},    //  080  0x50
                   { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7b79ed, 0xe3df0ffc, 0x07f80060, 0x00000000},    //  081  0x51
                   { 0x00000000, 0x0000007f, 0xc1ffc78f, 0x1e3c78f1, 0xe3c7fc1f, 0xe07bc1e7, 0xc78f9e1e, 0x78380000, 0x00000000},    //  082  0x52
                   { 0x00000000, 0x0000001f, 0x80ff078f, 0x1e1c7801, 0xfe03fe07, 0xfc00f1c3, 0xc79f0ff8, 0x1fc00000, 0x00000000},    //  083  0x53
                   { 0x00000000, 0x000000ff, 0xfbffe0f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  084  0x54
                   { 0x00000000, 0x00000070, 0x79c1e707, 0x9c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe7cf8ff8, 0x1fc00000, 0x00000000},    //  085  0x55
                   { 0x00000000, 0x000000e0, 0x7b81e70e, 0x1c383dc0, 0xf703dc07, 0xe01f803c, 0x00f00080, 0x02000000, 0x00000000},    //  086  0x56
                   { 0x00000000, 0x000000e7, 0x3b9cee73, 0xb9cee73b, 0x9cee73bb, 0xeefdfbe3, 0xef0fbc1e, 0x60300000, 0x00000000},    //  087  0x57
                   { 0x00000000, 0x000000e0, 0x7bc3e79e, 0x0ff01f80, 0x7e00f003, 0xc01f80ff, 0x079e3c3c, 0xe0700000, 0x00000000},    //  088  0x58
                   { 0x00000000, 0x000000e0, 0x73c3c79e, 0x0ff01f80, 0x7e00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  089  0x59
                   { 0x00000000, 0x0000007f, 0xe1ff800e, 0x007803c0, 0x1e00f007, 0x803c01e0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  090  0x5a
                   { 0x00000000, 0x7e01f807, 0x801e0078, 0x01e00780, 0x1e007801, 0xe007801e, 0x007801f8, 0x07e00000, 0x00000000},    //  091  0x5b
                   { 0x00000000, 0x001c0078, 0x01f001e0, 0x03c00f00, 0x1f003e00, 0x7c00f800, 0xe0018000, 0x00000000, 0x00000000},    //  092  0x5c
                   { 0x00000001, 0xf007c007, 0x001c0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007007c0, 0x1f000000, 0x00000000},    //  093  0x5d
                   { 0x0f807f07, 0x9e1c1800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  094  0x5e
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7ff9ffe7, 0xff9ffe00},    //  095  0x5f
                   			
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  128  0x80
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x00000000, 0x00000000, 0x00000007, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  129  0x81
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc0000000, 0x00000000, 0x00000007, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  130  0x82
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc0000000, 0x00000000, 0x00000007, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  131  0x83
                   { 0x00000000, 0x00000000, 0x00000fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03ff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  132  0x84
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03ff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  133  0x85
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xff80fe03, 0xf80fe03f, 0x80fe03ff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  134  0x86
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xff80fe03, 0xf80fe03f, 0x80fe03ff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  135  0x87
                   { 0x00000000, 0x00000000, 0x0000001f, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  136  0x88
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  137  0x89
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  138  0x8a
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc07f01fc, 0x07f01fc0, 0x7f01fc07, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  139  0x8b
                   { 0x00000000, 0x00000000, 0x00000fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  140  0x8c
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  141  0x8d
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  142  0x8e
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xf01fc07f, 0x01fc07f0, 0x1fc07f00},    //  143  0x8f
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000003ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  144  0x90
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x00000000, 0x00000000, 0x000003ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  145  0x91
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc0000000, 0x00000000, 0x000003ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  146  0x92
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc0000000, 0x00000000, 0x000003ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  147  0x93
                   { 0x00000000, 0x00000000, 0x00000fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  148  0x94
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fe0, 0x3f80fe03, 0xf80fe03f, 0x80fe03ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  149  0x95
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xff80fe03, 0xf80fe03f, 0x80fe03ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  150  0x96
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xff80fe03, 0xf80fe03f, 0x80fe03ff, 0xffffffff, 0xffffffff, 0xffffff00},    //  151  0x97
                   { 0x00000000, 0x00000000, 0x0000001f, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  152  0x98
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  153  0x99
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07f01f, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  154  0x9a
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xc07f01fc, 0x07f01fc0, 0x7f01ffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  155  0x9b
                   { 0x00000000, 0x00000000, 0x00000fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  156  0x9c
                   { 0xfe03f80f, 0xe03f80fe, 0x03f80fff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  157  0x9d
                   { 0x01fc07f0, 0x1fc07f01, 0xfc07ffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00},    //  158  0x9e
                   { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00}    //  159  0x9f
            	
		},
};

static const UINT32 TTX_Separated_Font[][9] = 			/*Added by tnntc.zhou 2011-7-1*/
{//Separated mode G1 Block Mosaics
    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},  // 20
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x00000000, 0x00000000, 0x00000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x00000000, 0x00000000, 0x00000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x00000000, 0x00000000, 0x00000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x00000000, 0x00000000, 0x00000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x00000000, 0x00000000, 0x00000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x00000000, 0x00000000, 0x00000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x00000000, 0x00000000, 0x00000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x00000000, 0x00000000, 0x00000000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x00000000, 0x00000000, 0x00000000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x00000000, 0x00000000, 0x00000000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07c01f00, 0x7c01f007, 0xc0000000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07c01f00, 0x7c01f007, 0xc0000000},  //3f

    { 0x00000000, 0x0003fc3f, 0xf1e1efbf, 0xbcfef3fb, 0xddef77bd, 0xdef3fbef, 0xe7801ffc, 0x3ff00000, 0x00000000},    //  064  0x40
    { 0x00000000, 0x00000007, 0x001c01f8, 0x07e01f80, 0xf783de1e, 0x3c78f3ff, 0xefffb81e, 0xc0180000, 0x00000000},    //  065  0x41
    { 0x00000000, 0x0000003f, 0x80ff03ce, 0x0f383ce0, 0xf383fc0f, 0xf83c70f1, 0xc3c70ff8, 0x3fc00000, 0x00000000},    //  066  0x42
    { 0x00000000, 0x0000001f, 0x80ff03ce, 0x1e1c7871, 0xe007801e, 0x007801e1, 0xc3ce0ff0, 0x1f800000, 0x00000000},    //  067  0x43
    { 0x00000000, 0x0000007f, 0x81ff071c, 0x1c3c70f1, 0xc3c70f1c, 0x3c70f1c3, 0xc71c1ff0, 0x7f800000, 0x00000000},    //  068  0x44
    { 0x00000000, 0x0000007f, 0xe1ff8700, 0x1c007001, 0xc007fc1f, 0xf07001c0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  069  0x45
    { 0x00000000, 0x0000003f, 0xe0ff83c0, 0x0f003c00, 0xf003fc0f, 0xf03c00f0, 0x03c00f00, 0x3c000000, 0x00000000},    //  070  0x46
    { 0x00000000, 0x0000000f, 0xc0ff838f, 0x9c1e7079, 0xc007001c, 0x7e71f9c1, 0xe38f8ffe, 0x0fc00000, 0x00000000},    //  071  0x47
    { 0x00000000, 0x00000070, 0x71c1c707, 0x1c1c7071, 0xc1c7ff1f, 0xfc7071c1, 0xc7071c1c, 0x70700000, 0x00000000},    //  072  0x48
    { 0x00000000, 0x0000000f, 0x003c00f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  073  0x49
    { 0x00000000, 0x00000000, 0xe003800e, 0x003800e0, 0x03800e00, 0x3870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},    //  074  0x4a
    { 0x00000000, 0x00000078, 0x39e1c78e, 0x1e707b81, 0xfc07e01f, 0xc07f81e7, 0x078e1e1c, 0x78380000, 0x00000000},    //  075  0x4b
    { 0x00000000, 0x0000001c, 0x007001c0, 0x07001c00, 0x7001c007, 0x001c0070, 0x01c007fc, 0x1ff00000, 0x00000000},    //  076  0x4c
    { 0x00000000, 0x0000007c, 0x7df1f7ef, 0xdfbf7efd, 0xfbf7ffde, 0xe77b9dee, 0x7791de47, 0x791c0000, 0x00000000},    //  077  0x4d
    { 0x00000000, 0x00000070, 0x39e0e7c3, 0x9f8e7e39, 0xfce7ff9e, 0xfe79f9e3, 0xe7839e0e, 0x78380000, 0x00000000},    //  078  0x4e
    { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7879e1, 0xe3cf0ffc, 0x07800000, 0x00000000},    //  079  0x4f
    { 0x00000000, 0x0000007f, 0xe1ffc78f, 0x1e3c78f1, 0xe3c7ff1f, 0xf87801e0, 0x07801e00, 0x78000000, 0x00000000},    //  080  0x50
    { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1e7879, 0xe1e7879e, 0x1e7b79ed, 0xe3df0ffc, 0x07f80060, 0x00000000},    //  081  0x51
    { 0x00000000, 0x0000007f, 0xc1ffc78f, 0x1e3c78f1, 0xe3c7fc1f, 0xe07bc1e7, 0xc78f9e1e, 0x78380000, 0x00000000},    //  082  0x52
    { 0x00000000, 0x0000001f, 0x80ff078f, 0x1e1c7801, 0xfe03fe07, 0xfc00f1c3, 0xc79f0ff8, 0x1fc00000, 0x00000000},    //  083  0x53
    { 0x00000000, 0x000000ff, 0xfbffe0f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  084  0x54
    { 0x00000000, 0x00000070, 0x79c1e707, 0x9c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe7cf8ff8, 0x1fc00000, 0x00000000},    //  085  0x55
    { 0x00000000, 0x000000e0, 0x7b81e70e, 0x1c383dc0, 0xf703dc07, 0xe01f803c, 0x00f00080, 0x02000000, 0x00000000},    //  086  0x56
    { 0x00000000, 0x000000e7, 0x3b9cee73, 0xb9cee73b, 0x9cee73bb, 0xeefdfbe3, 0xef0fbc1e, 0x60300000, 0x00000000},    //  087  0x57
    { 0x00000000, 0x000000e0, 0x7bc3e79e, 0x0ff01f80, 0x7e00f003, 0xc01f80ff, 0x079e3c3c, 0xe0700000, 0x00000000},    //  088  0x58
    { 0x00000000, 0x000000e0, 0x73c3c79e, 0x0ff01f80, 0x7e00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  089  0x59
    { 0x00000000, 0x0000007f, 0xe1ff800e, 0x007803c0, 0x1e00f007, 0x803c01e0, 0x07001ff8, 0x7fe00000, 0x00000000},    //  090  0x5a
    { 0x00000000, 0x7e01f807, 0x801e0078, 0x01e00780, 0x1e007801, 0xe007801e, 0x007801f8, 0x07e00000, 0x00000000},    //  091  0x5b
    { 0x00000000, 0x001c0078, 0x01f001e0, 0x03c00f00, 0x1f003e00, 0x7c00f800, 0xe0018000, 0x00000000, 0x00000000},    //  092  0x5c
    { 0x00000001, 0xf007c007, 0x001c0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007007c0, 0x1f000000, 0x00000000},    //  093  0x5d
    { 0x0f807f07, 0x9e1c1800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  094  0x5e
    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7ff9ffe7, 0xff9ffe00},    //  095  0x5f

    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000f803e, 0x00f803e0, 0x0f800000},  // 60
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x00000000, 0x00000000, 0x00000000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x00000000, 0x00000000, 0x00000000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x00000000, 0x00000000, 0x00000000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x000f803e, 0x00f803e0, 0x0f800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x00000000, 0x00000000, 0x00000000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x00000000, 0x00000000, 0x00000000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x00000000, 0x00000000, 0x00000000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f007c01, 0xf007c01f, 0x007c0000, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x003e00f8, 0x03e00f80, 0x3e00f800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x00000000, 0x00000000, 0x00000000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f007, 0xc01f007c, 0x01f00000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x000003e0, 0x0f803e00, 0xf803e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},
    { 0x0001f3e7, 0xcf9f3e7c, 0xf9f3e000, 0x1f3e7cf9, 0xf3e7cf9f, 0x3e7cf800, 0x07cf9f3e, 0x7cf9f3e7, 0xcf800000},  // 7f
//  { 0x00000007, 0xcf9f3e7c, 0xf9f3e000, 0x00007cf9, 0xf3e7cf9f, 0x3e000000, 0x07cf9f3e, 0x7cf9f3e0, 0x00000000},//0x7f
};

static const UINT32 TTX_G0_Nations[][14][9]  = //xuehui_ttx
{
	//00000000: Czech/Slovak
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x0f806301, 0x8c03e000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x18c03e00, 0x7001c000, 0x00000000, 0x03f01fe0, 0xf983800e, 0x003800f9, 0x83e607f8, 0x0fc00000, 0x00000000},
		{0x0e380dc0, 0x1c00c00f, 0x003c00f0, 0x07f01fc0, 0x3c00f003, 0xc00f003c, 0x00fc03f0, 0x03c00000, 0x00000000},
		{0x71c06e00, 0xe0000000, 0x00000000, 0x1ff07fc0, 0x0f007803, 0x801c01e0, 0x07fc1ff0, 0x7fc00000, 0x00000000},
		{0x03c01e00, 0xe0000000, 0x00000000, 0x3c78f1e0, 0xef03bc07, 0xf01f803e, 0x00f803e0, 0x06003803, 0xc00e0000},
		{0x01c00e00, 0x70000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
		{0x71c06e00, 0xe0000000, 0x00000000, 0x07701fc0, 0x7e01c007, 0x001c0070, 0x01c00700, 0x1c000000, 0x00000000},
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x01e00e00, 0x7001c000, 0x00000000, 0x03de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x0f780000, 0x00000000},
		{0x18603700, 0x7801e000, 0x00000000, 0x07e03fc3, 0xef8f1e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x01c01e00, 0xf0000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x1c701b80, 0x38000000, 0x00000000, 0x07f83cf0, 0xf003f007, 0xf803f003, 0xc3cf0f3c, 0x1fe00000, 0x00000000},
	},
	//00000001: English
	{
		{0x00000000, 0x000ffc7f, 0xf9ffe7c7, 0x8f007f01, 0xfc07f01f, 0xc03c01fc, 0x67ff9efe, 0x79f00000, 0x00000000},
		{0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},
		{0x00000000, 0x0003fc3f, 0xf1e1efbf, 0xbcfef3fb, 0xddef77bd, 0xdef3fbef, 0xe7801ffc, 0x3ff00000, 0x00000000},
		{0x00000000, 0x0003c01f, 0x00f807c0, 0x3c00fffb, 0xffefffbf, 0xfef001f0, 0x03e007c0, 0x0f000000, 0x00000000},
		{0x00000000, 0x003c38f0, 0xe3c60f38, 0x3cc0f7fb, 0xffefc7bf, 0x1e38f9e7, 0xc73e3cfe, 0xc3f80000, 0x00000000},
		{0x00000000, 0x0003c00f, 0x800f001e, 0x003efffb, 0xffefffbf, 0xfe00f807, 0x803c03e0, 0x0f000000, 0x00000000},
		{0x00000000, 0x0003c01f, 0x80ff07fe, 0x3ffeef7b, 0x3ce0f003, 0xc00f003c, 0x00f003c0, 0x0f003c00, 0x00000000},
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x0000fffb, 0xffefffbf, 0xfe000000, 0x00000000, 0x00000000, 0x00000000},
		{0x00000000, 0x003c38f1, 0xe3c70f3c, 0x3cc0f6fb, 0xffefddbf, 0x763b19ff, 0xe77fb006, 0xc0180000, 0x00000000},
		{0x00000000, 0x000ef03b, 0xc0ef03bc, 0x0ef03bc0, 0xef03bc0e, 0xf03bc0ef, 0x03bc0ef0, 0x3bc00000, 0x00000000},
		{0x00000000, 0x000000f8, 0x73f3c3ce, 0x3f78f900, 0xfdefffbf, 0x3e3918e4, 0x67ff9dfe, 0xc01b0060, 0x00000000},
		{0x00000000, 0x0003c00f, 0x003c0000, 0x00007fe1, 0xff87fe1f, 0xf8000000, 0x00f003c0, 0x0f000000, 0x00000000},
	},
	//00000010: Estonian
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x0c307983, 0x3c000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
		{0x30c06e00, 0xf003c01f, 0x88ff273e, 0x1c387800, 0xfc00fc00, 0xf870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},
		{0x70e1c387, 0x0e1c380f, 0x003c01f8, 0x07e03bc0, 0xef070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},
		{0x3ce0f383, 0xce0f380f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},
		{0x19c03e00, 0x600180ff, 0xe3ff801e, 0x00f807c0, 0x3e01e00f, 0x00f803e0, 0x0f003ff8, 0xffe00000, 0x00000000},
		{0x3870e1c3, 0x87000070, 0x39c0e703, 0x9c0e7039, 0xc0e7039c, 0x0e7039c0, 0xe7878ffc, 0x1fe00000, 0x00000000},
		{0x0e387d83, 0x1c0c700f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},
		{0x1c701b80, 0x38000000, 0x00000000, 0x07f83cf0, 0xf003f007, 0xf803f003, 0xc3cf0f3c, 0x1fe00000, 0x00000000},
		{0x3cf0f3c3, 0xcf0f3c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x39e0e783, 0x9e000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
		{0x71c06e00, 0xe0000000, 0x00000000, 0x1ff07fc0, 0x0f007803, 0x801c01e0, 0x07fc1ff0, 0x7fc00000, 0x00000000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
	},
	//00000011: French
	{
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x3ce0f383, 0xce000000, 0x00000000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},
		{0x1c003800, 0x7001c000, 0x00000000, 0x07bc7ff3, 0xe7cf0f3c, 0x3cf0f3c3, 0xcf9f1ffc, 0x1ef00000, 0x00000000},
		{0x79e1e787, 0x9e1e7800, 0x00000000, 0x07c07fc3, 0xef8f1e3f, 0xf8ffe3c0, 0x0f001ff0, 0x1f000000, 0x00000000},
		{0x07803701, 0x86061800, 0x00000000, 0x07e03fc3, 0xef8f1e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x1e003c00, 0x38000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x0f007603, 0x0c000000, 0x00000000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x1c003c00, 0x7801e000, 0x00000000, 0x07e03fc1, 0xef870e1f, 0xf87fe1c0, 0x07000ff0, 0x1f800000, 0x00000000},
		{0x03801b81, 0xc7071c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x07803301, 0x86000000, 0x00000000, 0x07e03fc3, 0xef8f0e3c, 0x38f0e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
		{0x0f006603, 0x0c000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x00000000, 0x0000001f, 0x81ff079e, 0x3c18f003, 0xc00f003c, 0x00f063c1, 0x879e1ff0, 0x1f80380f, 0xe03f8000},
	},
	//00000100: German
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},
		{0x00000000, 0x000ff07f, 0xf1e3c780, 0x1ff03ff1, 0xe3c7ff1f, 0xfc3fc003, 0xc78f1ffc, 0x3fc00000, 0x00000000},
		{0x70e1c387, 0x0e1c380f, 0x003c01f8, 0x07e03bc0, 0xef070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},
		{0x3ce0f383, 0xce0f380f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},
		{0x3870e1c3, 0x87000070, 0x39c0e703, 0x9c0e7039, 0xc0e7039c, 0x0e7039c0, 0xe7878ffc, 0x1fe00000, 0x00000000},
		{0x00007f03, 0x8e0c1800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001ffc7, 0xff1ffc00},
		{0x00007e03, 0xfc0c303f, 0xc07e0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
		{0x3cf0f3c3, 0xcf0f3c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x39e0e783, 0x9e000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x00000000, 0x0000001f, 0xc0ffc7cf, 0x1e3c7bf1, 0xef07bf9e, 0x1e7879e1, 0xe7bf9efc, 0x7801e007, 0x801e0000},
	},
	//00000101: Italian
	{
		{0x00000000, 0x000ffc7f, 0xf9ffe7c7, 0x8f007f01, 0xfc07f01f, 0xc03c01fc, 0x67ff9efe, 0x79f00000, 0x00000000},
		{0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x00007e03, 0xfc0c303f, 0xc07e0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
		{0x00000000, 0x0000001f, 0x81ff079e, 0x3c18f003, 0xc00f003c, 0x00f063c1, 0x879e1ff0, 0x1f80380f, 0xe03f8000},
		{0x00000000, 0x0003c00f, 0x800f001e, 0x003efffb, 0xffefffbf, 0xfe00f807, 0x803c03e0, 0x0f000000, 0x00000000},
		{0x00000000, 0x0003c01f, 0x80ff07fe, 0x3ffeef7b, 0x3ce0f003, 0xc00f003c, 0x00f003c0, 0x0f003c00, 0x00000000},
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x1e003c00, 0x38000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x1c003800, 0x7001c000, 0x00000000, 0x07bc7ff3, 0xe7cf0f3c, 0x3cf0f3c3, 0xcf9f1ffc, 0x1ef00000, 0x00000000},
		{0x1c003c00, 0x78000000, 0x00000000, 0x07e03fc1, 0xef870e1c, 0x3870e1ef, 0x87be0ff0, 0x1f800000, 0x00000000},
		{0x1c003c00, 0x7801e000, 0x00000000, 0x07e03fc1, 0xef870e1f, 0xf87fe1c0, 0x07000ff0, 0x1f800000, 0x00000000},
		{0x3c007800, 0x70000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
	},
	//00000110: Lettish/Lithuanian
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},
		{0x30c06e00, 0xf003c01f, 0x88ff273e, 0x1c387800, 0xfc00fc00, 0xf870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},
		{0x0e003800, 0xe0038000, 0x00000000, 0x07e07fc3, 0xef8f1e3f, 0xf8ffe3c0, 0x0f001ff0, 0x1f800000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x07e03fc1, 0xe7870e1f, 0xf87fe1c0, 0x07000ff0, 0x1f801e03, 0xf80fe000},
		{0x19c03e00, 0x600180ff, 0xe3ff801e, 0x00f807c0, 0x3e01e00f, 0x00f803e0, 0x0f003ff8, 0xffe00000, 0x00000000},
		{0x18c03e00, 0x7001c000, 0x00000000, 0x03f01fe0, 0xf983800e, 0x003800f9, 0x83e607f8, 0x0fc00000, 0x00000000},
		{0x0000ff03, 0xfc000000, 0x00000000, 0x3c38f0e3, 0xc38f0e3c, 0x38f0e3c3, 0x8ffe3ff8, 0x3fc00000, 0x00000000},
		{0x1c701b80, 0x38000000, 0x00000000, 0x07f83cf0, 0xf003f007, 0xf803f003, 0xc3cf0f3c, 0x1fe00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x079c7ff3, 0xe7cf073c, 0x1cf073c1, 0xcf9f1ffc, 0x1e703800, 0xfe03f800},
		{0x00000000, 0x00000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc03c00, 0xfe03f800},
		{0x71c06e00, 0xe0000000, 0x00000000, 0x1ff07fc0, 0x0f007803, 0x801c01e0, 0x07fc1ff0, 0x7fc00000, 0x00000000},
		{0x0f003c00, 0xf0000000, 0x00000000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000e03, 0xf80fe000},
	},
	//00000111: Polish
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x01c01e00, 0xf0000000, 0x00000000, 0x1ff07fe1, 0xc3870e1c, 0x3870e1c3, 0x870e1c38, 0x70e00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x079c7ff3, 0xe7cf073c, 0x1cf073c1, 0xcf9f1ffc, 0x1e703800, 0xfe03f800},
		{0x00000000, 0x0000007f, 0xf1ffc00f, 0x007c03c1, 0xffc7ff0f, 0x807c01f0, 0x07801ffc, 0x7ff00000, 0x00000000},
		{0x01c01e00, 0xf003c01f, 0x80ff071e, 0x1c387800, 0xfc00fc00, 0x7870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},
		{0x00000000, 0x000f003c, 0x60f383de, 0x0ff03f80, 0xfc03e01f, 0x00fc03f0, 0x0fff8ffe, 0x3ff80000, 0x00000000},
		{0x01c00e00, 0xf003c000, 0x00000000, 0x03f01fe0, 0xf983c00f, 0x003c00f9, 0x83e607f8, 0x0fc00000, 0x00000000},
		{0x03c01e00, 0xf0000000, 0x00000000, 0x07e03fc1, 0xef870e1c, 0x3870e1ef, 0x87be0ff0, 0x1f800000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x07e03fc1, 0xef870e1f, 0xf87fe1c0, 0x07000ff0, 0x1f803c00, 0xfe03f800},
		{0x0e003800, 0xe0000000, 0x00000000, 0x1ff07fc0, 0x0f007003, 0x801c01e0, 0x07fc1ff0, 0x7fc00000, 0x00000000},
		{0x01e00e00, 0x70000000, 0x00000000, 0x03f83cf0, 0xf003f003, 0xf803f003, 0xc3cf0f3c, 0x0fe00000, 0x00000000},
		{0x00000000, 0x000fe63f, 0xb8ffe07e, 0x01f00f80, 0x7e07f81d, 0xe007801e, 0x07fe1ff8, 0x7fe00000, 0x00000000},
		{0x03c01e00, 0xe0000000, 0x00000000, 0x0ff03fc0, 0x0f007803, 0x801c00e0, 0x03fc0ff0, 0x3fc00000, 0x00000000},
	},
	//00001000: Portuguess/Spanish
	{
		{0x00000000, 0x0000001f, 0x81ff079e, 0x3c18f003, 0xc00f003c, 0x00f063c1, 0x879e1ff0, 0x1f80380f, 0xe03f8000},
		{0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},
		{0x00000000, 0x0001c007, 0x001c0000, 0x01c00700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
		{0x01e00e00, 0x7001c000, 0x00000000, 0x03de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x0f780000, 0x00000000},
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x01c00e00, 0x70000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
		{0x03c01e00, 0xf0000000, 0x00000000, 0x07e03fc1, 0xef870e1c, 0x3870e1ef, 0x87be0ff0, 0x1f800000, 0x00000000},
		{0x01c01e00, 0xf0000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x00000000, 0x0001e007, 0x801e0000, 0x01e00780, 0xfe07c01e, 0x007879e1, 0xe7879ffe, 0x3ff00000, 0x00000000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
		{0x0e307d83, 0x1c000000, 0x00000000, 0x1ff07fe1, 0xc3870e1c, 0x3870e1c3, 0x870e1c38, 0x70e00000, 0x00000000},
		{0x1c003c00, 0x7801e000, 0x00000000, 0x07e03fc1, 0xef870e1f, 0xf87fe1c0, 0x07000ff0, 0x1f800000, 0x00000000},
		{0x1c003800, 0x7001c000, 0x00000000, 0x07bc7ff3, 0xe7cf0f3c, 0x3cf0f3c3, 0xcf9f1ffc, 0x1ef00000, 0x00000000},
	},
	//00001001: Rumanian
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x003c0ef0, 0x39e3c7ff, 0x07f878f1, 0xe3c78f1e, 0x3c1fe1ff, 0xc78f3e3e, 0xf0380000, 0x00000000},
		{0x00000000, 0x000000ff, 0xf3ffc0f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f001e03, 0xf80fe000},
		{0x0f006601, 0x980c300f, 0x003c01f8, 0x07e039c0, 0xe7070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},
		{0x00000000, 0x0000001f, 0x80ff071e, 0x1c387800, 0xfc00fc00, 0x7870e1c3, 0x878e0ff0, 0x1f801e03, 0xf80fe000},
		{0x30c06e01, 0xb803c00f, 0x003c01f8, 0x07e03bc0, 0xef070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},
		{0x07003601, 0x8c00001f, 0xc07f0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007007f0, 0x1fc00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
		{0x00000000, 0x0000c007, 0x001c0070, 0x07f01fc0, 0x1c007001, 0xc007001c, 0x007c01f0, 0x03c00e03, 0xf80fe000},
		{0x03801b81, 0xc7071c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x0ff07fe1, 0xe387801f, 0xf03fe003, 0x870e1ff8, 0x3fc01c07, 0xf01fc000},
		{0x1c701b00, 0x3800e000, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x0f007603, 0x0c000000, 0x00000000, 0x00000f00, 0x3c00f003, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},
	},
	//00001010: Serbian/Croatian/Slovenian
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x3cf0f3c3, 0xcf0f3c7f, 0xf1ffc780, 0x1e007801, 0xff87fe1e, 0x007801e0, 0x07801ffc, 0x7ff00000, 0x00000000},
		{0x31c06e01, 0xb803801f, 0x80ff079e, 0x1c187001, 0xc007001c, 0x007061c1, 0x879e0ff0, 0x1f800000, 0x00000000},
		{0x03c01e00, 0x7803801f, 0x80ff079e, 0x1c187001, 0xc007001c, 0x007061c1, 0x879e0ff0, 0x1f800000, 0x00000000},
		{0x19c03e00, 0x600180ff, 0xe3ff801e, 0x00f807c0, 0x3e01e00f, 0x00f803e0, 0x0f003ff8, 0xffe00000, 0x00000000},
		{0x00000000, 0x0000007f, 0x81ff879e, 0x1e3c78f3, 0xfbcfef1e, 0x3c78f1e3, 0xc79e1ff8, 0x7f800000, 0x00000000},
		{0x30c06e00, 0xf003c01f, 0x88ff273e, 0x1c387800, 0xfc00fc00, 0xf870e1c3, 0x878e0ff0, 0x1f800000, 0x00000000},
		{0x79e1e787, 0x9e1e7800, 0x00000000, 0x07c07fc3, 0xef8f1e3f, 0xf8ffe3c0, 0x0f001ff0, 0x1f000000, 0x00000000},
		{0x18c03e00, 0x7001c000, 0x00000000, 0x03f01fe0, 0xf983800e, 0x003800f9, 0x83e607f8, 0x0fc00000, 0x00000000},
		{0x01c00e00, 0xf003c000, 0x00000000, 0x03f01fe0, 0xf983c00f, 0x003c00f9, 0x83e607f8, 0x0fc00000, 0x00000000},
		{0x71c06e00, 0xe0000000, 0x00000000, 0x1ff07fc0, 0x0f007803, 0x801c01e0, 0x07fc1ff0, 0x7fc00000, 0x00000000},
		{0x00000000, 0x00003c00, 0xf01fe07f, 0x81fe00f1, 0xffcfff3f, 0xfcf0f3c3, 0xcf0f3ffc, 0x7ff00000, 0x00000000},
		{0x1c701b80, 0x38000000, 0x00000000, 0x07f83cf0, 0xf003f007, 0xf803f003, 0xc3cf0f3c, 0x1fe00000, 0x00000000},
	},
	//00001011: Swettxh/Finnish
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x003c0ef0, 0x39e3c7ff, 0x07f878f1, 0xe3c78f1e, 0x3c1fe1ff, 0xc78f3e3e, 0xf0380000, 0x00000000},
		{0x01e00e00, 0x7001c07f, 0xf1ffc780, 0x1e007801, 0xff87fe1e, 0x007801e0, 0x07801ffc, 0x7ff00000, 0x00000000},
		{0x70e1c387, 0x0e1c380f, 0x003c01f8, 0x07e03bc0, 0xef070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},
		{0x3ce0f383, 0xce0f380f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},
	//	{0x1f80c303, 0x0c0c301f, 0x803c01f8, 0x07e03bc0, 0xef0f0e3c, 0x38fff3ff, 0xcfff381c, 0xc0300000, 0x00000000},
		{0x03c01e00,	0xf003c007, 0x001c01f8, 0x07e01f80, 0xf783de1e, 0x3c78f3ff, 0xefffb81e, 0xc0180000, 0x00000000}, 					
		{0x3870e1c3, 0x87000070, 0x39c0e703, 0x9c0e7039, 0xc0e7039c, 0x0e7039c0, 0xe7878ffc, 0x1fe00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001ffc7, 0xff1ffc00},
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		{0x3cf0f3c3, 0xcf0f3c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},
		{0x39e0e783, 0x9e000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
        {0x0fc03f01, 0xce07380c, 0xc03301ff, 0x0ffc3cf1, 0xe1e7879e, 0x1e7879e1, 0xe3cf8ffe, 0x07980000, 0x00000000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
	},
	//00001100: Turkish
	{
		{0x00000000, 0x003fc0ff, 0x03fc03c0, 0x0f703dc0, 0xf703dc0f, 0x703dc0f7, 0x03df8f7e, 0x3df80000, 0x00000000},
		{0x0c701b80, 0x38000000, 0x00000000, 0x01e63ff8, 0xf3e7879e, 0x1e3cf8ff, 0xe3ff83fe, 0x0078f1e3, 0xff03f800},
		{0x07001c00, 0x7000001f, 0xc07f0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007007f0, 0x1fc00000, 0x00000000},
		{0x00000000, 0x0000001f, 0x80ff071e, 0x1c387800, 0xfc00fc00, 0x7870e1c3, 0x878e0ff0, 0x1f801e03, 0xf80fe000},
		{0x3ce0f383, 0xce0f380f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},
		{0x00000000, 0x0000001f, 0x81ff079e, 0x3c18f003, 0xc00f003c, 0x00f063c1, 0x879e1ff0, 0x1f80380f, 0xe03f8000},
		{0x3870e1c3, 0x87000070, 0x39c0e703, 0x9c0e7039, 0xc0e7039c, 0x0e7039c0, 0xe7878ffc, 0x1fe00000, 0x00000000},
		{0x1cc01e00, 0x3000c007, 0xc0ffc3cf, 0x9e1e7801, 0xe0079f9e, 0x7e7879e1, 0xe3cf8ffe, 0x07c00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x0ff07fe1, 0xe387801f, 0xf03fe003, 0x870e1ff8, 0x3fc01c07, 0xf01fc000},
		{0x39e0e783, 0x9e000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x03f01fe0, 0xf983c00f, 0x003c00f9, 0x83e607f8, 0x0fc00e03, 0xf80fe000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
	},

	//13: Danish   //xuehui_ttx
	{
		{0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},
		{0x00000000, 0x003c0ef0, 0x39e3c7ff, 0x07f878f1, 0xe3c78f1e, 0x3c1fe1ff, 0xc78f3e3e, 0xf0380000, 0x00000000},
		{0x01e00e00, 0x7001c07f, 0xf1ffc780, 0x1e007801, 0xff87fe1e, 0x007801e0, 0x07801ffc, 0x7ff00000, 0x00000000},
		//{0x70e1c387, 0x0e1c380f, 0x003c01f8, 0x07e03bc0, 0xef070e1c, 0x38fffbff, 0xefffb81e, 0xc0380000, 0x00000000},//AE
		{ 0x00000000, 0x0000001f, 0xf0ffc738, 0x1ce07381, 0xcfc73f1f, 0xe07f81ce, 0x07381cfc, 0x73f00000, 0x00000000},

		//{0x3ce0f383, 0xce0f380f, 0x80ff83ce, 0x1c1e7079, 0xc1e7079c, 0x1e7079c1, 0xe3ce0ff8, 0x0f800000, 0x00000000},//O/
		{ 0x00000000, 0x1800603f, 0xf1ffe733, 0x9cce7339, 0xcce7339c, 0xce7339cc, 0xe7339ffe, 0x3ff03000, 0x00000000},
		

		{0x03c01e00, 0xf003c007, 0x001c01f8, 0x07e01f80, 0xf783de1e, 0x3c78f3ff, 0xefffb81e, 0xc0180000, 0x00000000}, 					
		{0x3870e1c3, 0x87000070, 0x39c0e703, 0x9c0e7039, 0xc0e7039c, 0x0e7039c0, 0xe7878ffc, 0x1fe00000, 0x00000000},
		{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001ffc7, 0xff1ffc00},
		{0x03c01e00, 0xf003c000, 0x00000000, 0x07e03fc3, 0xef8f0e3f, 0xf8ffe3c0, 0x0f000ff0, 0x1f800000, 0x00000000},
		//{0x3cf0f3c3, 0xcf0f3c00, 0x00000000, 0x07de3ff9, 0xf3e7879e, 0x1e7879f3, 0xe7cf8ffe, 0x1f780000, 0x00000000},//ae
		{ 0x00000000, 0x00000000, 0x000003cf, 0x1ffe6318, 0x0c63ff8f, 0xfc63018c, 0x06319ffe, 0x3cf00000, 0x00000000},
		
		//{0x39e0e783, 0x9e000000, 0x00000000, 0x07e03fc3, 0xef8f1e3c, 0x78f1e3ef, 0x8fbe0ff0, 0x1f800000, 0x00000000},//o/
		{ 0x00000000, 0x00006001, 0x807f83ff, 0x0ccc3330, 0xccc3330c, 0xcc3330cc, 0xc3330ffc, 0x1fe01800, 0x60000000},

		
        {0x0fc03f01, 0xce07380c, 0xc03301ff, 0x0ffc3cf1, 0xe1e7879e, 0x1e7879e1, 0xe3cf8ffe, 0x07980000, 0x00000000},
		{0x38e0e383, 0x8e000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x87fe1ff8, 0x3fc00000, 0x00000000},
	},
};

static BOOL bTtxinfo_Status = FALSE;
static BOOL bTtxmenu_Enter = FALSE;

BOOL get_ttxinfo_status()
{
    return bTtxinfo_Status;
}

void set_ttxinfo_status(BOOL Enable)
{
    bTtxinfo_Status = Enable;
}

BOOL get_ttxmenu_status()
{
    return bTtxmenu_Enter;
}

void set_ttxmenu_status(BOOL Enable)
{
    bTtxmenu_Enter = Enable;
}

void ttx_osd_enter()
{
	struct OSDPara	tOpenPara;
	struct OSDRect	tOpenRect;
	struct OSDRect  r;
	enum OSDSys  eOSDSys;
	enum TVSystem tvsys;

	vpo_ioctl((struct vpo_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_DIS), VPO_IO_GET_OUT_MODE, (UINT32)(&tvsys));
	//osd_dev = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 0);
	//osd_dev = (struct osd_device *)dev_get_by_name("OSD_S36_1");
	osd_dev = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, g_ttx_pconfig_par.osd_layer_id);


    if ((ALI_M3327C == sys_ic_get_chip_id() && (g_ttx_pconfig_par.sys_sdram_size_2m == TRUE))
        || ALI_S3602 == sys_ic_get_chip_id() || ALI_S3602F == sys_ic_get_chip_id()|| ALI_S3811== sys_ic_get_chip_id()
        )
        OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_OFF);

#if 0//TTX_SMOOTH_PATCH
    vscr_open_screen();

	tOpenRect.uLeft = OSD_TTX_STARTCOL;
	tOpenRect.uWidth = OSD_TTX_WIDTH;
	tOpenRect.uTop = OSD_TTX_STARTROW;
	tOpenRect.uHeight = OSD_TTX_HEIGHT;	
   	m_bCurRegion = 1;
    if(m_flag_smooth)
    {
	    if(RET_SUCCESS != OSDDrv_CreateRegion((HANDLE)osd_dev, m_bCurRegion, &(tOpenRect), NULL))
    	    TTX_PRINTF("%s: create region failed\n", __FUNCTION__);
    }
    else
    {
#ifndef HDTV_SUPPORT
        OSDDrv_SetPallette((HANDLE)osd_dev, (UINT8*)ttx_pallette, TTX_COLOR_NUMBER, OSDDRV_YCBCR);
#endif
        tOpenPara.eMode= TTX_OSD_MODE;
        tOpenPara.uGAlphaEnable= FALSE;	
        tOpenPara.uGAlpha= 0x0f;
        tOpenPara.uPalletteSel = 0;
    	if(RET_SUCCESS != OSDDrv_CreateRegion((HANDLE)osd_dev, m_bCurRegion, &(tOpenRect), &tOpenPara))
        	TTX_PRINTF("%s: create region failed\n", __FUNCTION__);

#ifdef HDTV_SUPPORT
        OSDDrv_SetPallette((HANDLE)osd_dev, (UINT8*)ttx_pallette, TTX_COLOR_NUMBER, OSDDRV_YCBCR);
#endif
		
    }
#endif

	tOpenPara.eMode= TTX_OSD_MODE;
	tOpenPara.uGAlphaEnable= FALSE;	
	tOpenPara.uGAlpha= 0x0f;
	tOpenPara.uPalletteSel = 0;

    if(ALI_M3327C == sys_ic_get_chip_id() && (g_ttx_pconfig_par.sys_sdram_size_2m == TRUE))
    {
    	OSDDrv_SetPallette((HANDLE)osd_dev,(UINT8*)(g_ttx_pconfig_par.ttx_pallette), TTX_COLOR_NUMBER, OSDDRV_YCBCR);
    	tOpenRect.uLeft = osd_ttx_startcol;
    	tOpenRect.uWidth = osd_ttx_width;//OSD_TTX_WIDTH;
        if(get_ttxmenu_status()== TRUE && get_ttxinfo_status() == TRUE)
        {
            tOpenRect.uTop = (((570 - TTX_CHAR_H*27+14)>>1)>> 1)<<1;//(OSD_TTX_STARTROW >> 1) << 1;
    	    tOpenRect.uHeight = TTX_CHAR_H*27;//OSD_TTX_HEIGHT;
        }
        else
        {
    	    tOpenRect.uTop = (osd_ttx_startrow>> 1) << 1;
    	    tOpenRect.uHeight = osd_ttx_height;//OSD_TTX_HEIGHT;
        }
       	m_bCurRegion = 1;
    	if(RET_SUCCESS != OSDDrv_CreateRegion((HANDLE)osd_dev, m_bCurRegion, &(tOpenRect), &tOpenPara))
        	TTX_PRINTF("%s: create region failed\n", __FUNCTION__);
    }
    else
    {
    	OSDDrv_Close((HANDLE)osd_dev);
    	OSDDrv_Open((HANDLE)osd_dev, &tOpenPara);
    	osal_task_sleep(20);
    
    
    	//tOpenRect.uLeft = OSD_TTX_STARTCOL;
    	//tOpenRect.uWidth = OSD_TTX_WIDTH;
    	//tOpenRect.uTop = OSD_TTX_STARTROW;
    	//tOpenRect.uHeight = OSD_TTX_HEIGHT;
        tOpenRect.uLeft = osd_ttx_startcol;
    	tOpenRect.uWidth = osd_ttx_width;
    	tOpenRect.uTop = osd_ttx_startrow;
    	tOpenRect.uHeight = osd_ttx_height;
    
        m_bCurRegion = 0;
    	OSDDrv_CreateRegion((HANDLE)osd_dev, m_bCurRegion, &(tOpenRect), NULL);	
    	if(g_ttx_pconfig_par.hdtv_support_enable == FALSE)
        	OSDDrv_SetPallette((HANDLE)osd_dev,(UINT8*)(g_ttx_pconfig_par.ttx_pallette), TTX_COLOR_NUMBER, OSDDRV_YCBCR);
    
        if(g_ttx_pconfig_par.hdtv_support_enable == TRUE)
        	OSDDrv_SetPallette((HANDLE)osd_dev,(UINT8*)(g_ttx_pconfig_par.ttx_pallette), TTX_COLOR_NUMBER, OSDDRV_YCBCR);
    }
	r.uLeft = 0;
	r.uTop = 0;
	r.uWidth =tOpenRect.uWidth;
	r.uHeight =tOpenRect.uHeight;
    if(g_ttx_pconfig_par.ttx_color_number == 16)
    {
    	OSDDrv_ModifyPallette((HANDLE)osd_dev, TTX_B_BLACK, 0x10, 0x80, 0x80, 0);
    	OSDDrv_RegionFill((HANDLE)osd_dev, m_bCurRegion, &r, TTX_B_BLACK);
    }
    if(g_ttx_pconfig_par.ttx_color_number == 256)
    	OSDDrv_RegionFill((HANDLE)osd_dev, m_bCurRegion, &r, TTX_TRANSPARENT);
    
#if ((SYS_CHIP_MODULE == ALI_M3327C) && (SYS_SDRAM_SIZE == 2))
	eOSDSys = OSD_GetTVSys();
	OSDDrv_Scale((HANDLE)osd_dev, OSD_VSCALE_TTX_SUBT, (UINT32)(&eOSDSys));
#else
#ifdef HDTV_SUPPORT
	if(tvsys == NTSC||tvsys == PAL_M||tvsys == PAL_60||tvsys == NTSC_443||tvsys == LINE_720_30||tvsys == LINE_1080_30)
		eOSDSys = OSD_NTSC;
	else
		eOSDSys = OSD_PAL;
#else
	if(tvsys == NTSC||tvsys == PAL_M||tvsys == PAL_60||tvsys == NTSC_443)
		eOSDSys = OSD_NTSC;
	else
		eOSDSys = OSD_PAL;
#endif

    if(g_ttx_pconfig_par.osd_get_scale_para != NULL) //true color hd osd
    {
        //if(g_subt_config_par.hd_subtitle_support)  
        //    OSDDrv_Scale((HANDLE)osd_dev, OSD_SET_SCALE_MODE, OSD_SCALE_FILTER);
	 
	    UINT32 param = g_ttx_pconfig_par.osd_get_scale_para(tvsys, 720);//720);//ap_get_osd_scale_param(tvsys, 720);
        OSDDrv_Scale((HANDLE)osd_dev,OSD_SCALE_WITH_PARAM,param);
    }
    else
	OSDDrv_Scale((HANDLE)osd_dev,OSD_VSCALE_TTX_SUBT,(UINT32)(&eOSDSys));
	OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_ON);
#endif

#if 0//TTX_SMOOTH_PATCH
    if(OSD_PAL == eOSDSys)
        OSDDrv_IoCtl((HANDLE)osd_dev, OSD_IO_SET_VFILTER, 0x8000);
#endif

    if(ALI_M3327C == sys_ic_get_chip_id() && (g_ttx_pconfig_par.sys_sdram_size_2m == TRUE))
        OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_ON);

	ttx_show_on = TRUE;
}

void ttx_osd_leave()
{
	enum OSDSys  eOSDSys;
	enum TVSystem tvsys;
	struct OSDRect r;
	if(!ttx_show_on)
		return;
	vpo_ioctl((struct vpo_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_DIS), VPO_IO_GET_OUT_MODE, (UINT32)(&tvsys));
    
	/*
        struct osd_device *osd_dev;
	struct OSDPara	tOpenPara;
	struct OSDRect	tOpenRect;
	struct OSDRect  r;
	enum OSDSys  eOSDSys;
	enum TVSystem tvsys;
	
    	vpo_ioctl((struct vpo_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_DIS), VPO_IO_GET_OUT_MODE, (UINT32)(&tvsys));
	if(tvsys == NTSC||tvsys == PAL_M||tvsys == PAL_60||tvsys == NTSC_443)
		eOSDSys = OSD_NTSC;
	else
		eOSDSys = OSD_PAL;

	#if (COLOR_N==4)
		tOpenPara.eMode = OSD_4_COLOR;
	#elif (COLOR_N==16)
		tOpenPara.eMode = OSD_16_COLOR;
	#elif (COLOR_N==256)
		tOpenPara.eMode = OSD_256_COLOR;
	#endif
		tOpenPara.uGAlphaEnable = 0;
		tOpenPara.uGAlpha = 0x0f;

		
	tOpenRect.uLeft = (720 - OSD_MAX_WIDTH)>>1;
	tOpenRect.uWidth = OSD_MAX_WIDTH;
	tOpenRect.uTop = (eOSDSys== OSD_PAL)?((576 - OSD_MAX_HEIGHT)>>1):((480 - OSD_MAX_HEIGHT)>>1);
	tOpenRect.uHeight = OSD_MAX_HEIGHT;
	
	r.uLeft = 0;
	r.uTop = 0;
	r.uWidth =OSD_MAX_WIDTH;
	r.uHeight =OSD_MAX_HEIGHT;	
	
	osd_dev = (struct osd_device *)dev_get_by_name("OSD_M3327_0");
	
	OSDDrv_Close((HANDLE)osd_dev);
	OSDDrv_Open((HANDLE)osd_dev, &tOpenPara);

	OSDDrv_CreateRegion((HANDLE)osd_dev, 0, &(tOpenRect), NULL);
	OSDDrv_RegionFill((HANDLE)osd_dev,0,&r, OSD_TRANSPARENT_COLOR);
	OSDDrv_Scale((HANDLE)osd_dev,OSD_VSCALE_OFF,0);
	OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_ON);
	*/   
//	osd_dev = (struct osd_device *)dev_get_by_name("OSD_S36_1");
	osd_dev = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, g_ttx_pconfig_par.osd_layer_id);
	
	r.uLeft = 0;
	r.uTop = 0;
	//r.uWidth = OSD_TTX_WIDTH;
	//r.uHeight = OSD_TTX_HEIGHT;
	r.uWidth = osd_ttx_width;
	r.uHeight = osd_ttx_height;
    
	OSDDrv_RegionFill((HANDLE)osd_dev, m_bCurRegion, &r, TTX_TRANSPARENT);

#if (SYS_CHIP_MODULE == ALI_S3602 && SYS_PROJECT_FE == PROJECT_FE_DVBS)
    OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_OFF);
#endif

    OSDDrv_DeleteRegion((HANDLE)osd_dev, m_bCurRegion);

#if ((SYS_CHIP_MODULE == ALI_M3327C) && (SYS_SDRAM_SIZE == 2))
    eOSDSys = OSD_GetTVSys();
    if(OSD_NTSC == eOSDSys)
    {
        UINT32 dwMode = OSD_PAL;
	    OSDDrv_Scale((HANDLE)osd_dev, OSD_VSCALE_OFF, (UINT32)&dwMode);
    }
#else
#ifdef HDTV_SUPPORT
	if(tvsys == NTSC||tvsys == PAL_M||tvsys == PAL_60||tvsys == NTSC_443||tvsys == LINE_720_30||tvsys == LINE_1080_30)
		eOSDSys = OSD_NTSC;
	else
		eOSDSys = OSD_PAL;
#else
	if(tvsys == NTSC||tvsys == PAL_M||tvsys == PAL_60||tvsys == NTSC_443)
		eOSDSys = OSD_NTSC;
	else
		eOSDSys = OSD_PAL;
#endif

	OSDDrv_Scale((HANDLE)osd_dev,OSD_VSCALE_OFF,(UINT32)(&eOSDSys));
	OSDDrv_ShowOnOff((HANDLE)osd_dev, OSDDRV_OFF);
#endif

#if 0//TTX_SMOOTH_PATCH
    if(OSD_PAL == eOSDSys)
        OSDDrv_IoCtl((HANDLE)osd_dev, OSD_IO_SET_VFILTER, 0);
    vscr_close_screen();
#endif
    ttx_delete_whole();
	ttx_show_on = FALSE;   
}

void TTX_SetBackAlpha(UINT8 alpha)
{
	UINT8 i;
	if(ttx_show_on!=TRUE)
		return;
	TTX_PRINTF("-----------------enter TTX_SetBackAlpha()\n");
#if 0//TTX_SMOOTH_PATCH
    UINT8 *ptr, *ptr_fg, *ptr_bg;
    UINT8 y, color[3], j;

    if(!m_flag_smooth)
    {
    	for(i=8;i<16;i++)
    	{
    		OSDDrv_ModifyPallette((HANDLE)osd_dev, i, ttx_pallette[i*4], ttx_pallette[i*4+1], ttx_pallette[i*4+2], alpha);
    	}
        return;
    }

#if TTX_SOFT_ALPHA
    ptr = (UINT8 *)&ttx_pallette[TTX_F_BLACK*4];
    if(alpha)
        alpha++;
#endif
	for(i=0;i<8;i++)
	{
#if TTX_SOFT_ALPHA
        ptr_bg = (UINT8 *)&ttx_pallette[i*4];
        for(j=0; j<3; j++)
            color[j] = ((UINT16)ptr_bg[j]*alpha+(UINT16)ptr[j]*(16-alpha))/16;
	    OSDDrv_ModifyPallette((HANDLE)osd_dev, TTX_BACK_BASE+i, color[0], color[1], color[2], 0x0f);
#else
        ptr = (UINT8 *)&ttx_pallette[(TTX_BACK_BASE+i)*4];
	    OSDDrv_ModifyPallette((HANDLE)osd_dev, TTX_BACK_BASE+i, ptr[0], ptr[1], ptr[2], alpha);
#endif
	}

	for(i=0;i<8*8;i++)
	{
#if TTX_SOFT_ALPHA
        ptr_fg = (UINT8 *)&ttx_pallette[(i/8)*4];
        ptr_bg = (UINT8 *)&ttx_pallette[(i%8)*4];
        for(j=0; j<3; j++)
            color[j] = (ptr_fg[j] + ((UINT16)ptr_bg[j]*alpha+(UINT16)ptr[j]*(16-alpha))/16)/2;
	    OSDDrv_ModifyPallette((HANDLE)osd_dev, TTX_SMTH_BASE+i, color[0], color[1], color[2], 0x0f);
#else
        if(i%8)
        {
            ptr = (UINT8 *)&ttx_pallette[(TTX_SMTH_BASE+i)*4];
            y = alpha ? ptr[0] : 16;
		    OSDDrv_ModifyPallette((HANDLE)osd_dev, TTX_SMTH_BASE+i, y, ptr[1], ptr[2], alpha);
        }
#endif
	}
#endif

	for(i=8;i<16;i++)
	{
		OSDDrv_ModifyPallette((HANDLE)osd_dev, i, (g_ttx_pconfig_par.ttx_pallette)[i*4], (g_ttx_pconfig_par.ttx_pallette)[i*4+1], (g_ttx_pconfig_par.ttx_pallette)[i*4+2], alpha);
	}
	TTX_PRINTF("-----------------TTX_SetBackAlpha() succeed!\n");
}

void TTX_SetScreenColor(UINT8 color)
{
	struct OSDRect r1, r2;
	if(ttx_show_on!=TRUE)
		return;

	TTX_PRINTF("-----------------enter TTX_SetScreenColor()\n");

    OSDDrv_GetRegionPos((HANDLE)osd_dev,m_bCurRegion,&r1);

	r2.uLeft = 0;
	r2.uTop = 0;
	r2.uWidth =r1.uWidth;
	r2.uHeight =r1.uHeight;
	OSDDrv_RegionFill((HANDLE)osd_dev, m_bCurRegion, &r2, color);
#if 0//TTX_SMOOTH_PATCH
    vscr_set_screen_color(color);
#endif
	TTX_PRINTF("-----------------TTX_SetScreenColor() succeed!\n");

}

void TTX_ClearScreen(INT16 left, INT16 top, INT16 width, INT16 height, UINT8 color)//cloud
{
	struct OSDRect r1, r2;
	if(ttx_show_on!=TRUE)
		return;

     width=(width+0xf)&0xfff0;//cloud, 16 bytes aligned 
     /*
     if(left+width>OSD_TTX_WIDTH)
     {
         width=OSD_TTX_WIDTH-left;//avoid overflow
     }
     */
     if(left+width>osd_ttx_width)
     {
         width=osd_ttx_width-left;//avoid overflow
     }
    //OSDDrv_GetRegionPos((HANDLE)osd_dev,m_bCurRegion,&r1);

	r2.uLeft = left;//0;
	r2.uTop = top;//0;
	r2.uWidth = width;//OSD_TTX_WIDTH;//r1.uWidth;
	r2.uHeight = height;//TTX_CHAR_H*17;//r1.uHeight;
	OSDDrv_RegionFill((HANDLE)osd_dev, m_bCurRegion, &r2, color);

}


static UINT32 TTX_TEMP_CHAR[9];//cloud

static UINT32* select_ttx_font(UINT8 charset, UINT8 character, UINT8 i)
{
    if(charset == 0x10)
    {
        if(g_ttx_pconfig_par.ttx_cyrillic_1_support == TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_cyrillic_1(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }
    if(charset == 0x20)
    {
        if(g_ttx_pconfig_par.ttx_cyrillic_2_support == TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_cyrillic_2(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }
    if(charset == 0x30)
    {
        if(g_ttx_pconfig_par.ttx_cyrillic_3_support == TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_cyrillic_3(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }
    if(charset == 0x40)
    {
        if(g_ttx_pconfig_par.ttx_greek_support == TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_greek(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }
    if(charset == 0x50)
    {
        if(g_ttx_pconfig_par.ttx_arabic_support== TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_arabic(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }
    if(charset == 0x60)
    {
        if(g_ttx_pconfig_par.ttx_hebrew_support== TRUE)
            return g_ttx_pconfig_par.get_ttxchar_from_hebrew(0,character-0x20,i);
        else
            return ((UINT32*)&TTX_Font[MOSAIC_CHAR][character-0x20][i]);
    }

    return ((UINT32*)&TTX_Font[LATIN_CHAR][character-0x20][i]);
}

UINT32* find_char(UINT16 charset, UINT8 character, UINT8 p26_char_set)
{
	UINT8 char_idx; //charset_idx, nation_charidx;
	static UINT8 char_nation = 0; 
	UINT8 charset_g0 = charset & 0xff;
	UINT8 charset_g2 = charset>>8;

	if(character < 0x20 )
        //||character > 0x7f)
		return NULL;
	char_idx = character - 0x20;

    if(g_ttx_pconfig_par.parse_packet26_enable == TRUE)
    {
        if((character>>7==0)&&(p26_char_set == 0xf))// Character from the G2 Set
        {
		if(charset_g2==0x10)
		{
			if(g_ttx_pconfig_par.ttx_cyrillic_g2_support && g_ttx_pconfig_par.get_ttxchar_from_greek_g2 != NULL)
				return g_ttx_pconfig_par.get_ttxchar_from_cyrillic_g2(0,char_idx,0);
			else
				return NULL;
		}
		else if(charset_g2==0x20)
		{
			if(g_ttx_pconfig_par.ttx_greek_g2_support && g_ttx_pconfig_par.get_ttxchar_from_greek_g2 != NULL)
				return g_ttx_pconfig_par.get_ttxchar_from_greek_g2(0,char_idx,0);
			else
				return NULL;
		}
		else if(charset_g2==0x30)
		{
			if(g_ttx_pconfig_par.ttx_arabic_g2_support && g_ttx_pconfig_par.get_ttxchar_from_arabic_g2 != NULL)
				return g_ttx_pconfig_par.get_ttxchar_from_arabic_g2(0,char_idx,0);
			else
				return NULL;
		}

		if (g_ttx_pconfig_par.get_ttxchar_from_g2 != NULL)
			return g_ttx_pconfig_par.get_ttxchar_from_g2(0,char_idx,0);
		else
			return NULL;
        }
        if(character>>7==1)//Characters Including Diacritical Marks,G0+G2
        {
            p26_char_set+=0x40;
            character=character&0x7F;
    
            UINT8 i;
            for(i=0;i<9;i++)
            {
                if(character<0x20)
                    return NULL;
                //TTX_TEMP_CHAR[i]=TTX_Font[charset][character-0x20][i]|TTX_G2_Font[0][p26_char_set-0x20][i];
                TTX_TEMP_CHAR[i]= (*select_ttx_font(charset_g0, character, i)) | (*(g_ttx_pconfig_par.get_ttxchar_from_g2(0,p26_char_set-0x20,i)));
            }
            
            return (UINT32*)TTX_TEMP_CHAR;
            
        }
    }
     
	if(!(charset_g0 & 0xf0))  //charset index: 0 ,Latin G0;
	{
			char_nation = charset_g0 & 0x0f;   
			if(char_idx == 0x03)
			{
				//nation_charidx = 0;
				return((UINT32*)&TTX_G0_Nations[char_nation][0][0]);
			}
			else if(char_idx == 0x04)
			{
				//nation_charidx = 1;
				return((UINT32*)&TTX_G0_Nations[char_nation][1][0]);
			}
			else if(char_idx == 0x20)
			{
				//nation_charidx = 2;
				return((UINT32*)&TTX_G0_Nations[char_nation][2][0]);
			}
			else if(char_idx == 0x3b)
			{
				//nation_charidx = 3;
				return((UINT32*)&TTX_G0_Nations[char_nation][3][0]);
			}
			else if(char_idx == 0x3c)
			{
				//nation_charidx = 4;
				return((UINT32*)&TTX_G0_Nations[char_nation][4][0]);
			}
			else if(char_idx == 0x3d)
			{
				//nation_charidx = 5;
				return((UINT32*)&TTX_G0_Nations[char_nation][5][0]);
			}
			else if(char_idx == 0x3e)
			{
				//nation_charidx = 6;
				return((UINT32*)&TTX_G0_Nations[char_nation][6][0]);
			}
			else if(char_idx == 0x3f)
			{
				//nation_charidx = 7;
				return((UINT32*)&TTX_G0_Nations[char_nation][7][0]);
			}
			else if(char_idx == 0x40)
			{
				//nation_charidx = 8;
				return((UINT32*)&TTX_G0_Nations[char_nation][8][0]);
			}
			else if(char_idx == 0x5b)
			{
				//nation_charidx = 9;
				return((UINT32*)&TTX_G0_Nations[char_nation][9][0]);
			}
			else if(char_idx == 0x5c)
			{
				//nation_charidx = 10;
				return((UINT32*)&TTX_G0_Nations[char_nation][10][0]);
			}
			else if(char_idx == 0x5d)
			{
				//nation_charidx = 11;
				return((UINT32*)&TTX_G0_Nations[char_nation][11][0]);
			}
			else if(char_idx == 0x5e)
			{
				//nation_charidx = 12;
				return((UINT32*)&TTX_G0_Nations[char_nation][12][0]);
			}
			else
				return((UINT32*)&TTX_Font[0][char_idx][0]);

	}
	else if(charset_g0 >= 0x10 && charset_g0<= 0x60) //Cyrillic-1,greek......
	{
		//return( (UINT32*)&TTX_Font[CYRILLIC_1_CHAR][char_idx][0]);
		return select_ttx_font(charset_g0, character, 0);
	}
	else if(charset_g0 == 0xb0) //charset index:  0xb0,G1 block mosaics set
	{	//modified by Steve Lee 2004.12.19
			if(char_idx == 0x20)
			{
				//nation_charidx = 2;
				return((UINT32*)&TTX_G0_Nations[char_nation][2][0]);
			}
			else if(char_idx == 0x3b)
			{
				//nation_charidx = 3;
				return((UINT32*)&TTX_G0_Nations[char_nation][3][0]);
			}
			else if(char_idx == 0x3c)
			{
				//nation_charidx = 4;
				return((UINT32*)&TTX_G0_Nations[char_nation][4][0]);
			}
			else if(char_idx == 0x3d)
			{
				//nation_charidx = 5;
				return((UINT32*)&TTX_G0_Nations[char_nation][5][0]);
			}
			else if(char_idx == 0x3e)
			{
				//nation_charidx = 6;
				return((UINT32*)&TTX_G0_Nations[char_nation][6][0]);
			}
			else if(char_idx == 0x3f)
			{
				//nation_charidx = 7;
				return((UINT32*)&TTX_G0_Nations[char_nation][7][0]);
			}	
			else
			{
                if(/*(char_idx == 0x5f) && */(get_mosaic_mode()==0))
                    return( (UINT32*)&TTX_Separated_Font[char_idx][0]);
                else
				return( (UINT32*)&TTX_Font[1][char_idx][0]);
			}

	}
	else
	{
		return NULL;
	}

}

/*charactor 'A' bitmap, for test
UINT8 char_a[] = {
				0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x20,0x20,0x00,0x00,0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,
             		0x22,0x22,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,
             		0x22,0x22,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,
             		0x22,0x22,0x00,0x00,0x00,0x00,0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,
             		0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,0x00,0x00,0x00,0x00,0x22,0x22,
             		0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,0x00,0x00,0x00,0x00,0x22,0x22,
             		0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,0x00,0x00,0x00,0x00,0x22,0x22,
             		0x20,0x20,0x00,0x00,0x02,0x02,0x22,0x22,0x00,0x00,0x00,0x00,0x22,0x22,
             		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x02,0x02,0x22,0x22,0x22,0x22,0x20,0x20,0x00,0x00,0x02,0x02,
             		0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x20,0x20,0x02,0x02,
             		0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x20,0x20,0x02,0x02,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
             		0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
	};

*/

//#define GEN_TTX_FONT //enable this DEFINE can print and generate TTX font--Michael Xie 2006/08/25
#if 0//def GEN_TTX_FONT

UINT8 tmp_char[] = 
{
0,0,0,1,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,1,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,0,0,0,0,0,0,
0,0,0,0,0,1,1,1,1,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,1,1,1,1,0,0,1,1,1,1,0,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,1,1,1,1,0,0,0,0,1,1,1,1,0,
0,0,1,1,1,1,0,0,1,1,1,1,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,


/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
*/

/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,//AE
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,1,1,1,1,1,1,1,1,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,1,1,1,0,0,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,1,1,1,0,0,
0,1,1,1,0,0,1,1,1,1,1,1,0,0,
0,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,0,0,0,0,0,
0,1,1,1,0,0,1,1,1,1,1,1,0,0,
0,1,1,1,0,0,1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
*/

/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,//O/
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,0,0,1,1,0,0,1,1,1,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
*/
/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,//ae
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,0,0,1,1,1,1,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,1,1,0,0,0,1,1,0,0,0,1,1,0,
0,0,0,0,0,0,1,1,0,0,0,1,1,0,
0,0,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,1,1,0,0,0,1,1,0,0,0,0,0,0,
0,1,1,0,0,0,1,1,0,0,0,0,0,0,
0,1,1,0,0,0,1,1,0,0,0,1,1,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,0,
0,0,1,1,1,1,0,0,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
*/


/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,//o/
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,
0,0,0,1,1,1,1,1,1,1,1,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,0,0,1,1,0,0,1,1,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,1,1,1,1,1,1,1,1,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
*/

};

void ttx_gen_char_code(void);

void ttx_gen_char(void)
{
   // ttx_print_char((UINT32*)&TTX_G2_Font[0][0x21][0]);
   // ttx_print_char((UINT32*)&TTX_G2_Font[0][0x22][0]);
   // ttx_print_char((UINT32*)&TTX_Font[0][0x41+('O'-'a')][0]);
//    ttx_print_char((UINT32*)&TTX_Font[0][0x41+('p'-'a')][0]);
//    ttx_print_char((UINT32*)&TTX_Font[0][0x41+('n'-'a')][0]);
    //ttx_print_char((UINT32*)&TTX_Font[0][0xF][0]);
    //ttx_print_char((UINT32*)&TTX_G0_Nations[13][0][0]);
    ttx_gen_char_code();
}

void ttx_print_char(UINT32 *char_addr)
{
    UINT8 i, j;
    UINT32 charmask;
	UINT16 bit_count = 0;

/*    for(i = 0; i < 9; i++)
    {
        TTX_PRINTF("0x%8x, ", *(char_addr+i));
        dly_tsk(1);
    }
    TTX_PRINTF("\n");*/
        
    for(i = 0 ;i < 9;i++)
    {
        charmask = 0x80000000;	
		for(j = 0 ;j < 32 ;j++)
		{
            if(bit_count >= TTX_CHAR_W * TTX_CHAR_H)	//char draw finished
                break;
			if(bit_count!=0 && bit_count %14 ==0)	//one row finished, change to next
			{
				TTX_PRINTF("\n");
                dly_tsk(1);
			}
			//TTX_PRINTF("------------------charmask = %x \n",charmask);
			//16 color, 2 pixels per byte 
			//if(TTX_Font[charset_idx][char_idx][i] & charmask)
			if(*char_addr & charmask)
			{
				TTX_PRINTF("1,");
                dly_tsk(1);
			}
			else
			{
				TTX_PRINTF("0,");
                dly_tsk(1);
			}

			bit_count ++;
			charmask = charmask>>1;
		}
		char_addr += 1;
		//TTX_PRINTF("-----TTX_DrawChar(),-----4,   -----normal,  %d  UINT32 = %x draw finished!\n", i, TTX_Font[charset_idx][char_idx][i]);
   	}
    TTX_PRINTF("\n");
    TTX_PRINTF("\n");
}

void ttx_gen_char_code(void)
{
    UINT8 i, j;
    UINT32 dw_bit, dw_byte ;
	UINT16 bit_count = 0;
    UINT32 data[9];

    for(i = 0; i < 9; i++)
    {
        data[i] = 0;
    }
    
    for(i = 0 ;i < TTX_CHAR_H;i++)
    {
        for(j = 0 ;j < TTX_CHAR_W ;j++)
		{
            bit_count = i*TTX_CHAR_W+j;
            dw_bit = bit_count%32;
            dw_byte = bit_count/32;
            if(tmp_char[bit_count] & 1)
            {
                data[dw_byte] |= (1<<(31-dw_bit));
            }
        }
   	}
    TTX_PRINTF("{ ");
    for(i = 0; i < 9; i++)
    {
        //TTX_G2_Font[0][0x5e][i] = data[i];
        //TTX_G0_Nations[13][2][i] = data[i];
        if(i != 8)
            TTX_PRINTF("0x%08x, ", data[i]);
        else
            TTX_PRINTF("0x%08x", data[i]);
        dly_tsk(1);
    }
    TTX_PRINTF("},\n");
    TTX_PRINTF("\n");
    TTX_PRINTF("\n");

}
#endif

